#include "ThreadPool.hpp"
#include "Task.hpp"
#include <memory>
//懒汉模式实现单例
using namespace ThreadPoolModule;
int main()
{
    ENABLE_CONSOLE_LOG();
    ThreadPool<task_t>::GetInstance()->Start();
    int cnt = 10;
    while(cnt--)
    {
        ThreadPool<task_t>::GetInstance()->Enqueue(Push);
        sleep(1);
    }
    ThreadPool<task_t>::GetInstance()->Stop();
    ThreadPool<task_t>::GetInstance()->Wait();
    return 0;
}